﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BS.aspx.cs" Inherits="GPCSC.Web.sjs.BS" %>
<%@ Register assembly="NickLee.Web.UI" namespace="NickLee.Web.UI" tagprefix="NickLee" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
      <title>淮安市领导干部下基层活动网站</title>
<meta name="KEYWords" content="淮安市领导干部下基层活动,三解三促,三进三帮" />
<meta name="DEscription" content="淮安市领导干部下基层活动,三解三促,三进三帮" />
            <link href="../Css/main.css" rel="stylesheet" type="text/css" />

           <link href="../Css/GridCss.css" rel="stylesheet" type="text/css" />
            <script type="text/javascript" src="../scripts/jquery-1.6.2.min.js"></script>
            <script type ="text/javascript" src ="../scripts/datepicker/WdatePicker.js"></script>
             <style>
                 .table
                 {
                     width:100%;
                     margin-left:20px;
                     margin-right:20px;
                     
                     
                     }
             .td
             {
                 margin:50px;
                 font:  12px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; 
                 color: #0161a1; 
                 text-align:center;
                 
                }
                .td img
                {
                    cursor:pointer;
                    }
             </style>
          <script>
              function bs() {
                  document.getElementById("bsids").value ="";

                  document.getElementById("types").value = "";
                  var checks = $("#Panel1").find("input[type='checkbox']");
                  if (checks.length > 0) {
                      for (var i = 0; i < checks.length; i++) {
                          if (checks[i].checked == true) {
                              document.getElementById("bsids").value += checks[i].value + "|";
                           
                              document.getElementById("types").value += checks[i].types + "|";
                          }
                      }
                  }

//                  var bsids = document.getElementById("bsids").value;
//                  var types = document.getElementById("types").value;
//                  if (bsids == "") {
//                      alert("请选择反馈表！");
//                  }
//                  else {
//                      LCallBack.Callback("1",bsids,types);
//                  }
              }
              function opne(ids, types) {
                  //                  alert("1");
                  // window.open("../CM/nchdxs.aspx?type=" + types + "&ids=" + ids);
                  if (types == "1") {
                      window.open("../CM/ncs.aspx?ids=" + ids);
                  }
                  else if (types == "3") {
                      window.open("../CM/QYS.aspx?ids=" + ids);
                  }
                  else if (types == "2") {
                      window.open("../CM/SQS.aspx?ids=" + ids);
                  }
              }
              $(document).ready(
                function () {
                    $("td").addClass("td");
                    $("table").addClass("table");

//                    if (document.getElementById("yfh").checked == true) {
//                        //                        alert(true);
//                        //隐藏
//                        $("td[title='1']").hide();
//                        $("td[title='2']").hide();
//                    }
                }
              );

                function LCallBack_onCallbackComplete()
              {
                $("td").addClass("td");
                $("table").addClass("table");
                var sel = document.getElementById("sels"); 
                ch(sel);
             //   alert(sel);
                }
                function sel() {
                    var name = $("#lgname").val();
                    var date = $("#date").val();
                    var jdate = $("#Text1").val();
                    var zt = $("#bszt").val();
                    LCallBack.Callback("5",name,date,zt,jdate);
                }
                function date_onclick() {
                    LCallBack.Callback("5", name, date, zt, jdate);
                }

                function hide() {
                    LCallBack.Callback("yc");
                }
                function yhide(e) {
                    if (e.checked == true) {
                        //                        alert(true);
                        //隐藏
                        $("td[title='1']").hide();
                        $("td[title='2']").hide();
                    }
                    else {
                        //                        alert(false);
                        //显示
                        $("td[title='1']").show();
                        $("td[title='2']").show();
                    }
                }
          </script>
          <script>
              function dels(e) {
                  var ids = $(e).attr("del");
                  var type = $(e).attr("type");
                  //                  locking();
                  
                      delss(ids,type);
             
              }
              function locking() {
                  document.all.ly.style.display = "block";
                  document.all.ly.style.width = document.body.clientWidth;
                  document.all.ly.style.height = document.body.clientHeight;
                  document.all.Layer2.style.display = 'block';
              }
              function Lock_CheckForm() {

                  document.all.ly.style.display = 'none';
                  document.all.Layer2.style.display = 'none';
              }
              function delss(ids, type) {
//                  var ids = $("#diss").val();
//                  var type = $("#typ").val();
if (confirm("您确定删除么？")) {
                  LCallBack.Callback("del", ids,type);
                  }
//                  Lock_CheckForm();
              }
              function ch(event) {
                  var val = event.value;
                  if (val == "1") {
                      $("#grid").hide();
                      $("#grids").slideDown("slow");
                  }
                  else if (val == "2") {
                      $("#grids").hide();
                      $("#grid").slideDown("slow");
                  }
              }
          </script>
          
</head>
<body>
    <form id="form1" runat="server">
    <div>


         <div  style=" width:100%; text-align:center; margin:0px;" class="td">
         <input type="text" id="bsids" runat="server"  style=" display:none"  />
         <input type="text" id="types" runat="server" style=" display:none" />
         领导人名称：<input type="text" id="lgname" />
         填写时间：<input type="text" id="date" onclick="return date_onclick()" />
          <img  style="margin-bottom:0px;"  src="../Images/calendar.gif"  onclick="WdatePicker({el:'date'})"/>
          至
          <input type="text" id="Text1" onclick="return date_onclick()" />
          <img  style="margin-bottom:0px;"  src="../Images/calendar.gif"  onclick="WdatePicker({el:'Text1'})"/>
         报送状态：<select id="bszt">
          <option value="" selected="selected">--请选择--</option>
            <option value="0" >未复核</option>
            <option value="1">已复核</option>         
         </select>
         <input type="button" class="buttonCss" value=" 搜索"  onclick="sel()" />
        <%-- <input type ="button" class="buttonCss" value="复核通过"  onclick="bs()" />--%>
             <asp:Button ID="Button1" runat="server" CssClass="buttonCss"  Text="复核通过" 
                 onclick="Button1_Click" OnClientClick="bs()" />
         </div>
            
         <div style=" margin-left:20px;">
         <span style=" color: #0161a1;">展现方式：</span>
         <select  id="sels" onchange="ch(this)">
         <option selected="selected" value="1">
            文档显示
         </option>
         <option value="2">
            列表显示
         </option>
         </select>
           <br />
         <input type="checkbox" id="ywfh" runat="server" onclick="hide()"   /><span style=" color: #0161a1;">隐藏未复核的表格</span>
  <input type="checkbox" id="yfh"  runat="server"   onclick="hide()" /><span style=" color: #0161a1;">隐藏已复核的表格</span>

      
        </div>
            <nicklee:CallBack runat="server" ID="LCallBack" OnCallback="LCallBack_Callback" PostState="True"
            Width="100%" Height="100%" 
            LoadingPanelFadeDuration="800" LoadingPanelFadeMaximumOpacity="80">
            <Content>
                <asp:Panel ID="Panel1" runat="server">
              
<div id="grids"  style=" margin:20px; border: 1px solid #C1DAD7; ">
  
<%=xjc.ToString()%>
</div>
<div id="grid" class="grid" style=" width:100%; margin:20px; display:none" >

    <asp:Repeater ID="PostListS" runat="server">
    <HeaderTemplate>
    
    
    <table width="100%" >
<tr height="26px" >
<th>

</th>
<th  >
领导人
</th>
<th >
上报时间
</th>

<th >
状态
</th>
<th colspan="2">
操作
</th>
</tr>
</HeaderTemplate>
<ItemTemplate>


<!--不带底色-->
<tr>
<td>

<input type="checkbox"   types="<%# DataBinder.Eval(Container.DataItem, "types")%>" value="<%# DataBinder.Eval(Container.DataItem, "ids")%>" />
</td>
<td>

<%# DataBinder.Eval(Container.DataItem, "REALNAME")%>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "tjdate")%>
</td>
<td >
<%# DataBinder.Eval(Container.DataItem, "title")%>
</td>
<td style=" cursor:pointer;"  onclick="opne('<%# DataBinder.Eval(Container.DataItem, "ids")%>','<%# DataBinder.Eval(Container.DataItem, "types")%>')">
[修改]
</td>

<td style=" cursor:pointer;"  onclick="delss('<%# DataBinder.Eval(Container.DataItem, "ids")%>','<%# DataBinder.Eval(Container.DataItem, "types")%>')">
[删除]
</td>
</tr>

</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>

</asp:Repeater>
<!--分页-->
<div id="pageinfo" class="pageinfo" runat="server"></div>	
</div>

     </asp:Panel>
            </Content>
            <ClientEvents>
         <CallbackComplete EventHandler="LCallBack_onCallbackComplete" />
               <%-- <CallbackError EventHandler="LCallBack_onCallbackError" />--%>
            </ClientEvents>
            <LoadingPanelClientTemplate>
                <table style="width: 100%; height: 100%;" cellspacing="0" cellpadding="0" border="0"
                    bgcolor="#e0e0e0">
                    <tr style="width: 100%; height: 100%;">
                        <td style="width: 100%; height: 100%; vertical-align: middle; text-align: center;">
                            <table cellspacing="0" cellpadding="0" border="0">
                                <tr>
                                    <td style="font-family: tahoma; font-size: 12px; text-align: center;">
                                        数据载入中...&nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td style="font-family: tahoma; font-size: 12px; text-align: center;">
                                        <img alt="" src="../images/GreenBar.gif" border="0" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
           </LoadingPanelClientTemplate>
         </nicklee:CallBack>
        
    </div>

              <div id="ly" style="position: absolute; top: 0px; filter: alpha(opacity=60); background-color: #777;
        z-index: 2; left: 0px; display: none;">
    </div>
      
    <div id="Layer2" align="center" style="position: absolute; left:200px; top:100px; z-index: 1000;  background-color: #fff; display:none;" >
      
        <input type="text" id="diss"  style=" display:none;"/>
        <input type="text" id="typ"  style=" display:none;"/>

        <div style="text-align:right">
        <img src="../Images/delete.gif" style=" cursor:pointer;"  title="关闭" onclick="Lock_CheckForm(this)" />
        </div>
        <div style=" margin-top:30px; margin-bottom:30px; margin-left:10px; margin-right:10px;">
        
        <div style=" font-size:18px; color:Red; font-weight:bold; float:left; margin-right:10px;">
        您确定数据
        <br />
        <br />
       &nbsp;&nbsp; 无效作废么？
        </div>
      
        <div onclick="delss()" style="float:left;  vertical-align:top; border: 1px solid #000; padding-top:2px; padding-bottom:2px; padding-left:10px; padding-right:10px; background-color:#BAE0E3; cursor:pointer;"  >
        确定
        </div>
        </div>
        <br />
        <br />
    </div>
    </div>
    </form>
</body>
</html>
